function std = hitrate_std(hits,nsim)
     prob = mean(hits);
     std = sqrt(prob*(1-prob)/nsim);           
end
